// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_greylisting_triplets
// * CreateDate    : 2014-06-05 18:29:57
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:57
// * LastChanger   : 2014-06-05 18:29:57
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmGreylistingTripletsEntity : EntityBase
    {
        public HmGreylistingTripletsTable TableSchema
        {
            get
            {
                return HmGreylistingTripletsTable.Current;
            }
		}
		
		public HmGreylistingTripletsEntity()
        {

        }
		
		public HmGreylistingTripletsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Glid = Convert.ToInt64(CommonFunctions.ToObject(dr["glid"]));
			this.Glcreatetime = Convert.ToDateTime(CommonFunctions.ToObject(dr["glcreatetime"]));
			this.Glblockendtime = Convert.ToDateTime(CommonFunctions.ToObject(dr["glblockendtime"]));
			this.Gldeletetime = Convert.ToDateTime(CommonFunctions.ToObject(dr["gldeletetime"]));
			this.Glipaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["glipaddress1"]));
			this.Glipaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["glipaddress2"]));
			this.Glsenderaddress = Convert.ToString(CommonFunctions.ToObject(dr["glsenderaddress"]));
			this.Glrecipientaddress = Convert.ToString(CommonFunctions.ToObject(dr["glrecipientaddress"]));
			this.Glblockedcount = Convert.ToInt32(CommonFunctions.ToObject(dr["glblockedcount"]));
			this.Glpassedcount = Convert.ToInt32(CommonFunctions.ToObject(dr["glpassedcount"]));
        }
		
		public HmGreylistingTripletsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Glid = Convert.ToInt64(CommonFunctions.ToObject(dr["glid"]));
			this.Glcreatetime = Convert.ToDateTime(CommonFunctions.ToObject(dr["glcreatetime"]));
			this.Glblockendtime = Convert.ToDateTime(CommonFunctions.ToObject(dr["glblockendtime"]));
			this.Gldeletetime = Convert.ToDateTime(CommonFunctions.ToObject(dr["gldeletetime"]));
			this.Glipaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["glipaddress1"]));
			this.Glipaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["glipaddress2"]));
			this.Glsenderaddress = Convert.ToString(CommonFunctions.ToObject(dr["glsenderaddress"]));
			this.Glrecipientaddress = Convert.ToString(CommonFunctions.ToObject(dr["glrecipientaddress"]));
			this.Glblockedcount = Convert.ToInt32(CommonFunctions.ToObject(dr["glblockedcount"]));
			this.Glpassedcount = Convert.ToInt32(CommonFunctions.ToObject(dr["glpassedcount"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmGreylistingTripletsTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public long Glid
        {
            get { return Convert.ToInt64(GetData(HmGreylistingTripletsTable.C_glid)); }
            set { SetData(HmGreylistingTripletsTable.C_glid, value); }
        }
		
        [DataMember]
        public DateTime Glcreatetime
        {
            get { return Convert.ToDateTime(GetData(HmGreylistingTripletsTable.C_glcreatetime)); }
            set { SetData(HmGreylistingTripletsTable.C_glcreatetime, value); }
        }
		
        [DataMember]
        public DateTime Glblockendtime
        {
            get { return Convert.ToDateTime(GetData(HmGreylistingTripletsTable.C_glblockendtime)); }
            set { SetData(HmGreylistingTripletsTable.C_glblockendtime, value); }
        }
		
        [DataMember]
        public DateTime Gldeletetime
        {
            get { return Convert.ToDateTime(GetData(HmGreylistingTripletsTable.C_gldeletetime)); }
            set { SetData(HmGreylistingTripletsTable.C_gldeletetime, value); }
        }
		
        [DataMember]
        public long Glipaddress1
        {
            get { return Convert.ToInt64(GetData(HmGreylistingTripletsTable.C_glipaddress1)); }
            set { SetData(HmGreylistingTripletsTable.C_glipaddress1, value); }
        }
		
        [DataMember]
        public long Glipaddress2
        {
            get { return Convert.ToInt64(GetData(HmGreylistingTripletsTable.C_glipaddress2)); }
            set { SetData(HmGreylistingTripletsTable.C_glipaddress2, value); }
        }
		
        [DataMember]
        public string Glsenderaddress
        {
            get { return Convert.ToString(GetData(HmGreylistingTripletsTable.C_glsenderaddress)); }
            set { SetData(HmGreylistingTripletsTable.C_glsenderaddress, value); }
        }
		
        [DataMember]
        public string Glrecipientaddress
        {
            get { return Convert.ToString(GetData(HmGreylistingTripletsTable.C_glrecipientaddress)); }
            set { SetData(HmGreylistingTripletsTable.C_glrecipientaddress, value); }
        }
		
        [DataMember]
        public int Glblockedcount
        {
            get { return Convert.ToInt32(GetData(HmGreylistingTripletsTable.C_glblockedcount)); }
            set { SetData(HmGreylistingTripletsTable.C_glblockedcount, value); }
        }
		
        [DataMember]
        public int Glpassedcount
        {
            get { return Convert.ToInt32(GetData(HmGreylistingTripletsTable.C_glpassedcount)); }
            set { SetData(HmGreylistingTripletsTable.C_glpassedcount, value); }
        }
		
		#endregion
	}
	
	
}	

